import request from "@/utils/request";

//登录
export function login(data) {
  return request({
    url: "/login",
    method: "post",
    data: data
  });
}


//注册
export function register(data) {
    return request({
        url: "/register",
        method: "post",
        data: data
    });
}


//获取用户信息
export const userInfo=()=>request({
    method:'get',
    url:'mall/user/getUserInfo'
})

//退出登录
export const logout=()=>request({
    method:'post',
    url:'/logOut'
})


//用户充值
export const recharge=(data)=>request({
    method:'post',
    url:`/user/pay/recharge`,
    data
})

//获取充值订单
export const getRechargeOrder=()=>request({
    method:'get',
    url:`/mall/userRechargeOrders/list`
})

